﻿<common:LayoutAwarePage
    x:Name="pageRoot"
    x:Class="Fitness.detailPages"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Fitness"
    xmlns:common="using:Fitness.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">


    <Page.TopAppBar>
        <AppBar x:Name="appBar2" Padding="10,0,10,0" Background="#FFD7D7D7" BorderBrush="{x:Null}" MinHeight="88" d:IsHidden="True">
            <Grid Margin="0" >
                <StackPanel Margin="110,10,0,10" Orientation="Horizontal" HorizontalAlignment="Left" Height="90">
                    <Button x:Name="btnTopApp" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="0" Style="{StaticResource TopAppStyl}" Height="91" Tapped="btnTopApp_Tapped_1">
                        <Image Width="85" Height="89" Source="Assets/AppTop1.png" Stretch="None" VerticalAlignment="Top"/>
                    </Button>
                    <Button x:Name="btnTopApp2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="0" Style="{StaticResource TopAppStyl}" Height="91" Margin="0,0,0,-1">
                    	<Image Width="85" Height="89" Source="Assets/AppTop2.png" Stretch="None" VerticalAlignment="Top"/>
                    </Button>
                    <Button x:Name="btnTopApp3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="0" Style="{StaticResource TopAppStyl}" Height="91" Margin="0,0,0,-1" Tapped="btnTopApp3_Tapped_1">
                    	<Image Width="85" Height="89" Source="Assets/AppTop3.png" Stretch="None" VerticalAlignment="Top"/>
                    </Button>
                    <Button x:Name="btnTopApp4" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="0" Style="{StaticResource TopAppStyl}" Height="91" Margin="0,0,0,-1">
                    	<Image Width="85" Height="89" Source="Assets/AppTop4.png" Stretch="None" VerticalAlignment="Top"/>
                    </Button>
                    <Button x:Name="btnTopApp5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="0" Style="{StaticResource TopAppStyl}" Height="91" Margin="0,0,0,-1"  Tapped="btnTopApp5_Tapped_1">
                    	<Image Width="85" Height="89" Source="Assets/AppTop5.png" Stretch="None" VerticalAlignment="Top"/>
                    </Button>
                    <Button x:Name="btnTopApp6" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="0" Style="{StaticResource TopAppStyl}" Height="91" Margin="0,0,0,-1">
                    	<Image Width="85" Height="89" Source="Assets/AppTop6.png" Stretch="None" VerticalAlignment="Top"/>
                    </Button>
                </StackPanel>
            </Grid>
        </AppBar>
    </Page.TopAppBar>
    <Page.Resources>

        <!-- TODO: Delete this line if the key AppName is declared in App.xaml -->
        <x:String x:Key="AppName">My Application</x:String>
    </Page.Resources>

    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
    <Grid x:Name="MainGrid" Style="{StaticResource LayoutRootStyle}">
    	<Grid.Background>
    		<ImageBrush ImageSource="Assets/bg.png"/>
    	</Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!-- Back button and page title -->
        <Grid x:Name="Header">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="backButton" Click="GoBack" IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}" Style="{StaticResource BackButtonStyle}"/>
            <TextBlock x:Name="pageTitle" Grid.Column="1" Text="Smoked Salmon" Style="{StaticResource PageHeaderTextStyle}" Margin="0,0,300,40"/>
            <Grid x:Name="LogoMain" HorizontalAlignment="Right" Height="89" VerticalAlignment="Center" Width="212" Grid.Column="1" Margin="0,0,40,0">
            	<Grid.Background>
            		<ImageBrush ImageSource="Assets/MainLogo.png"/>
            	</Grid.Background>
            </Grid>
        </Grid>
        <ScrollViewer x:Name="scrollViewer" Grid.Row="1"  Style="{StaticResource HorizontalScrollViewerStyle}">
        	<ScrollViewer.Background>
        		<ImageBrush ImageSource="Assets/Bg2.png"/>
        	</ScrollViewer.Background>
        	<Grid x:Name="ContanerGrid" Margin="120,0,0,0">
        		<Grid.ColumnDefinitions>
        			<ColumnDefinition Width="500"/>
        			<ColumnDefinition Width="25"/>
        			<ColumnDefinition Width="302"/>
        			<ColumnDefinition Width="25"/>
        			<ColumnDefinition Width="302"/>
        			<ColumnDefinition Width="40"/>
        		</Grid.ColumnDefinitions>
        		<Grid x:Name="ImageGrid">
        			<Grid.RowDefinitions>
        				<RowDefinition Height="40"/>
        				<RowDefinition Height="372.239"/>
        				<RowDefinition Height="82.089"/>
        				<RowDefinition Height="56.672"/>
        			</Grid.RowDefinitions>
        			<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="30" Foreground="White" FontWeight="Light" Text="Calorie Level- Low" Margin="0,-8,0,0"/>
        			<Image Grid.Row="1" Source="Assets/RecipesPage/RelpIc8.png" Margin="0,0,0,0.239" Stretch="Fill"/>
        			<Grid x:Name="TextGrid" Height="54" VerticalAlignment="Bottom" Background="#7EFFFFFF" Margin="0,0,0,40" Grid.Row="1">
        				<Grid x:Name="InnerGrid1" Margin="15,0,0,0">
        					<TextBlock TextWrapping="Wrap" Text="Smoked Salmon" Foreground="#FF181D1D" FontFamily="Segoe UI" FontSize="15" VerticalAlignment="Center" Margin="0" HorizontalAlignment="Left" FontWeight="Bold"/>
        				</Grid>
        			</Grid>
        			<StackPanel Grid.Row="2" Margin="15,10,10,0">
        				<TextBlock TextWrapping="Wrap" Text="Preparation Time 10 minutes" FontFamily="Segoe UI" FontSize="16" Margin="-1,0,0,0"/>
        				<TextBlock TextWrapping="Wrap" Text="Cooking Time 10 minutes" FontFamily="Segoe UI" FontSize="16" Margin="-1,0,0,0"/>
        				<TextBlock TextWrapping="Wrap" Text="Servings 6" FontFamily="Segoe UI" FontSize="16" Margin="-1,0,0,0"/>
        			</StackPanel>
        		</Grid>
        		<Grid x:Name="IngredientsGrid" Grid.Column="2" Height="546" VerticalAlignment="Top">
        			<Grid.RowDefinitions>
        				<RowDefinition Height="372"/>
        			</Grid.RowDefinitions>
        			<Grid x:Name="InnerGrid" Margin="0">
        				<Grid.RowDefinitions>
        					<RowDefinition Height="50"/>
        					<RowDefinition/>
        				</Grid.RowDefinitions>
        				<StackPanel Grid.Row="1" Margin="15,0,10,0">
        					<TextBlock TextWrapping="Wrap" FontFamily="Segoe UI" FontSize="14" FontWeight="Light" Margin="0,0,0,10">
        						<Run Text="Chopped Broccoli | 2 cups"/>
        						<LineBreak/>
        						<Run/>
        						<LineBreak/>
        						<Run Text="Garlic | 1 clove minced"/>
        						<LineBreak/>
        						<Run/>
        						<LineBreak/>
        						<Run Text="Cauliflower chopped into florets | 1/2 medium"/>
        						<LineBreak/>
        						<Run/>
        						<LineBreak/>
        						<Run Text="Chopped  Parsley | 2 teaspoons"/>
        						<LineBreak/>
        						<Run/>
        						<LineBreak/>
        						<Run Text="Lemon Juice | 2 Tablespoon"/>
        						<LineBreak/>
        						<Run/>
        						<LineBreak/>
        						<Run Text="Olive oil | 1 Tablespoon"/>
        						<LineBreak/>
        						<Run/>
        						<LineBreak/>
        						<Run Text="Salt and pepper powder | to taste"/>
        						<LineBreak/>
        						<Run/>
        						<LineBreak/>
        						<Run Text="Pepper Powder&#x9;| 1 teaspoons"/>
        					</TextBlock>
        				</StackPanel>
        				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Ingredients" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="30" Margin="15,-7,0,0" FontWeight="Light" Height="40" Grid.RowSpan="2" Width="139"/>
        			</Grid>
        		</Grid>
        		<Grid x:Name="IngredientsGrid_Copy" Grid.Column="4" Height="546" VerticalAlignment="Top">
        			<Grid.RowDefinitions>
        				<RowDefinition Height="372"/>
        			</Grid.RowDefinitions>
        			<Grid x:Name="InnerGrid2" Margin="0">
        				<Grid.RowDefinitions>
        					<RowDefinition Height="50"/>
        					<RowDefinition/>
        				</Grid.RowDefinitions>
        				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Method" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="30" Margin="15,-7,0,0" FontWeight="Light" Height="40" Grid.RowSpan="2" Width="139"/>
        				<StackPanel Grid.Row="1" Margin="15,0,10,0">
        					<TextBlock TextWrapping="Wrap" Text="Steam broccoli and cauliflower until tender (about 10 minutes)." FontFamily="Segoe UI" FontSize="14" Margin="0,0,0,10" FontWeight="Light"/>
        					<TextBlock TextWrapping="Wrap" Text="In small saucepan, mix the lemon juice, oil, and garlic, and cook over low heat for 2 or 3 minutes." FontFamily="Segoe UI" FontSize="14" Margin="0,0,0,10" FontWeight="Light"/>
        					<TextBlock TextWrapping="Wrap" Text="Put vegetables in serving dish. " FontFamily="Segoe UI" FontSize="14" Margin="0,0,0,10" FontWeight="Light"/>
        					<TextBlock TextWrapping="Wrap" Text="Pour lemon sauce over them." FontFamily="Segoe UI" FontSize="14" Margin="0,0,0,10" FontWeight="Light"/>
        					<TextBlock TextWrapping="Wrap" Text="Garnish with parsley." FontFamily="Segoe UI" FontSize="14" Margin="0,0,0,10" FontWeight="Light"/>
        				</StackPanel>
        			</Grid>
        		</Grid>
        	</Grid>
        </ScrollViewer>
        <Grid x:Name="Snaped" Grid.RowSpan="2" Visibility="Collapsed">
        	<TextBlock x:Name="textBlock" HorizontalAlignment="Center" TextWrapping="Wrap" Text="Please switch to full screen to view the details." VerticalAlignment="Center" FontFamily="Segoe UI" FontSize="24" Foreground="White" Margin="19.21,352.077,18.79,351.923"/>
        </Grid>

        <VisualStateManager.VisualStateGroups>

            <!-- Visual states reflect the application's view state -->
            <VisualStateGroup x:Name="ApplicationViewStates">
                <VisualState x:Name="FullScreenLandscape"/>
                <VisualState x:Name="Filled"/>

                <!-- The entire page respects the narrower 100-pixel margin convention for portrait -->
                <VisualState x:Name="FullScreenPortrait">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PortraitBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="ContanerGrid">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Thickness>99,0,0,0</Thickness>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>

                <!-- The back button and title have different styles when snapped -->
                <VisualState x:Name="Snapped">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedPageHeaderTextStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="scrollViewer">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Collapsed</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Header">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Visible</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="LogoMain">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Collapsed</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Snaped">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Visible</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="appBar2">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Collapsed</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="pageTitle">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Thickness>0,0,5,40</Thickness>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
    </Grid>
</common:LayoutAwarePage>
